package MyConvertStream;

import java.io.*;
import java.nio.charset.Charset;

public class demo1 {
    public static void main(String[] args) throws IOException {
//        InputStreamReader isr = new InputStreamReader(new FileInputStream("ddd.txt"),"GBK");
//        int b;
//        while ((b = isr.read()) != -1){
//            System.out.print((char) b);
//        }
        //isr.close();
        FileReader fr = new FileReader("ddd.txt", Charset.forName("GBK"));
        int b;
        while ((b = fr.read()) != -1){
            System.out.print((char) b);
        }
        fr.close();
    }
}
